﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//Thai Bao - Nov 12, 2011
//For relating file processes
namespace MyUtils
{
    public class FileUtils
    {
        /// <summary>
        /// //if not exist folder, create newfolder
        /// </summary>
        /// <param name="ResourePath"></param>
        public static  void CheckFileExist(String ResourePath)
        {
            String exePath = GetExePath();
            if (!System.IO.File.Exists(exePath))
            {
                
                System.IO.Directory.CreateDirectory(exePath + ResourePath);
            }
        }
        /// <summary>
        /// Get path's current execute file
        /// </summary>
        /// <returns></returns>
        public static String GetExePath()
        {
            String exePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
            return exePath;
        }
    }
}
